import java.io.*;
import java.util.regex.*;

public class NormalStringReader {
    public static void main(String[] args) {
        try {
            BufferedReader br = new BufferedReader(new FileReader("D:\\email.txt"));
            String line;
            while ((line = br.readLine()) != null) {
                parse(line);  // 逐行处理
            }
            br.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
    }

    // 提取所有普通字符串（由字母、数字、下划线组成的片段）
    private static void parse(String line) {
        Pattern pattern = Pattern.compile("\\w+");  // 匹配普通字符串
        Matcher matcher = pattern.matcher(line);
        while (matcher.find()) {
            System.out.println(matcher.group());  // 输出匹配到的每一个字符串
        }
    }
}
